﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Text;
using BaBaoFan.Modifier.Data;
using BaBaoFan.Modifier.Model;
using Dapper;
namespace BaBaoFan.Modifier.Service
{
    public class MillInfoService : IMillInfoService
    {
        private readonly IMillInfoRepository _millInfoRepository;
        public MillInfoService(IMillInfoRepository millInfoRepository)
        {
            _millInfoRepository = millInfoRepository;
        }

        public bool Add(MillInfo millInfo)
        {
            return _millInfoRepository.Add(millInfo);
        }

        public bool Delete(int[] ids)
        {
            return _millInfoRepository.Delete(ids);
        }

        public MillInfo GetMillById(int id)
        {
            return _millInfoRepository.GetMillById(id);
        }

        public IEnumerable<MillInfoDto> GetMillInfos()
        {
            return _millInfoRepository.GetMillInfos();
        }

        public bool Update(MillInfo millInfo)
        {
            return _millInfoRepository.Update(millInfo);
        }
    }
}
